package com.inspiration.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.inspiration.entity.Tag;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TagMapper  extends BaseMapper<Tag> {
    /**
     * 标签下内容个数
     * @param tId
     * @return
     */
    @Select(" select count(1) from tag_content_relation where tcr_t_id  = #{tId}  ")
    int contentCount(long tId);

    @Delete(" delete from tag_content_relation where tcr_t_id  = #{tId} ")
    int delContentRelation(long tId);
}
